package com.project.expose;

import com.project.utils.TestJava;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;

/**
 * @author Sweey Zhang
 * @description
 * @date 2021/9/9 10:44
 */
@Component
//@RequestMapping("/expose/dss")
public class DssMonitorRunner implements ApplicationRunner {

    /**
     * 查询园区监控信息列表
     */
//    @GetMapping("/getBayonetData")
//    public AjaxResult getBayonetData() {
//        String result = null;
//
//        try {
//            TestJava.getkakou();
////            File file = new File(TestJava.BAYONET_FILE_PATH);
////            if (!file.exists()) {
////                file.createNewFile();
////            }
////            FileReader fr = new FileReader(file);
////            BufferedReader bf = new BufferedReader(fr);
////            result = bf.readLine();
//        } catch (Exception e) {
//            e.printStackTrace();
//        }
//
//        return AjaxResult.success(result);
//    }
    @Override
    public void run(ApplicationArguments args) throws Exception {
        try {
            TestJava.getkakou();
//            File file = new File(TestJava.BAYONET_FILE_PATH);
//            if (!file.exists()) {
//                file.createNewFile();
//            }
//            FileReader fr = new FileReader(file);
//            BufferedReader bf = new BufferedReader(fr);
//            result = bf.readLine();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
